# GCC Code Coverage Report

src/AutomaticCleaningSession.cpp

Line | Branch | Exec | Source
--- | --- | --- | ---
1 |  |  | #include "rvc/AutomaticCleaningSession.hpp"
2 |  |  |
3 |  |  | #include "rvc/NavigationAndEscapeCoordinator.hpp"
4 |  |  | #include "rvc/SurfaceCleaningController.hpp"
5 |  |  |
6 |  |  | namespace rvc {
7 |  |  |
8 |  | 7 | AutomaticCleaningSession::AutomaticCleaningSession(NavigationAndEscapeCoordinator& navigation,
9 |  |  | SurfaceCleaningController& cleaning)
10 |  | 7 | : navigation_(navigation), cleaning_(cleaning) {}
11 |  |  |
12 |  | 6 | void AutomaticCleaningSession::StartSession(SessionSource source) {
13 |  | 6 | sessionActive_ = true;
14 |  | 6 | sessionSource_ = source;
15 |  | 6 | notifySessionStateChanged();
16 |  | 6 | }
17 |  |  |
18 |  | 3 | void AutomaticCleaningSession::StopSession() {
19 |  | 3 | sessionActive_ = false;
20 |  | 3 | notifySessionStateChanged();
21 |  | 3 | }
22 |  |  |
23 |  | 1 | void AutomaticCleaningSession::ResumeSession(SessionSource source) {
24 |  | 1 | sessionActive_ = true;
25 |  | 1 | sessionSource_ = source;
26 |  | 1 | notifySessionStateChanged();
27 |  | 1 | }
28 |  |  |
29 |  | 1 | void AutomaticCleaningSession::requestServiceOrReset() {
30 |  | 1 | sessionActive_ = false;
31 |  | 1 | notifySessionStateChanged();
32 |  | 1 | }
33 |  |  |
34 |  | 11 | void AutomaticCleaningSession::notifySessionStateChanged() {
35 |  | 11 | navigation_.SessionStateChanged(sessionActive_);
36 |  | 11 | cleaning_.SessionStateChanged(sessionActive_);
37 |  | 11 | }
38 |  |  |
39 |  |  | } // namespace rvc
40 |  |  |